﻿using MiniFox.Components;
using MiniFox.Platform.File.Models;
using MiniFox.Platform.File.Services.Impls;

namespace MiniFox.Platform.File.Services
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(DefaultStorageService))]
    public interface IStorageService
    {
        /// <summary>
        /// 
        /// </summary>
        string Group { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileIds"></param>
        void Accept(string[] fileIds);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileIds"></param>
        Task AcceptAsync(string[] fileIds);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderId"></param>
        /// <param name="fileDatas"></param>
        /// <returns></returns>
        IEnumerable<FileData> Upload(string folderId, FileData[] fileDatas);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderId"></param>
        /// <param name="fileDatas"></param>
        /// <returns></returns>
        Task<IEnumerable<FileData>> UploadAsync(string folderId, FileData[] fileDatas);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileIds"></param>
        void Remove(string[] fileIds);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="newName"></param>
        /// <returns></returns>
        void Rename(string fileId, string newName);
    }


}